const { setup, configuration, search, searchMovie, searchTv, movieDetail
    , tvDetail,tvSeason, moviePopular, tvPopular, movieGenre, tvGenre 
} = require('../src/utils/media-netdata/tmdb');

const config = require('./test-config');
; (async () => {

    setup(config.tmdb)

    // const res = await search('雷神4');
    // console.log('res:', res);

    // const movies = await searchMovie('雷神4', 2022);

    // console.log('movies:', movies);

    // const tvs = await searchTv('big mouth', 2022);

    // console.log('tvs:', tvs);

    // const tmdb = await configuration();
    // console.log(tmdb);

    // const detail = await movieDetail(616037);
    // console.log(detail.credits);


    const detail = await tvDetail(210594);
    console.log('tv detail', detail.credits);

    // const season = await tvSeason( 155226 , 1)
    // console.log(season);

    // console.log(await moviePopular());

    // console.log(await tvPopular());

    // console.log(await movieGenre());

    // console.log(await tvGenre());

    // countries jobs languages primary_translations timezones

    // console.log(await configuration('countries').then(res => {
    //     require('fs').writeFileSync('./test/tmdb-countries.json', JSON.stringify(res, null, 4));
    // }));

    // console.log(await configuration('languages').then(res => {
    //     require('fs').writeFileSync('./test/tmdb-languages.json', JSON.stringify(res, null, 4));
    // }));
})();